import Vue from 'vue'
import VueRouter from 'vue-router'
import UiCategoryView from "@/views/ui/category/UiCategoryView.vue";
import UiEmployeeView from "@/views/ui/employee/UiEmployeeView.vue";
import UiUserView from "@/views/ui/user/UiUserView.vue";
import UiLoginView from "@/views/ui/employee/UiLoginView.vue";
import UiBookView from "@/views/ui/book/UiBookView.vue";
import UiBorrowView from "@/views/ui/borrow/UiBorrowView.vue";

Vue.use(VueRouter)

const routes = [
    // 默认页面
    {
        path: '/',
        // redirect:'/login'
        redirect: '/category'
    },

    // 登录页面
    {
        path: '/login',
        name: 'uiLogin',
        component: UiLoginView
    },
    // 图书分类页面
    {
        path: '/category',
        name: 'uiCategory',
        component: UiCategoryView
    },
    // 员工信息页面
    {
        path: '/emp',
        name: 'uiEmployee',
        component: UiEmployeeView
    },
    // 用户信息页面
    {
        path: '/user',
        name: 'uiUser',
        component: UiUserView
    },
    // 图书信息页面
    {
        path: '/book',
        name: 'uiBook',
        component: UiBookView
    },
    // 借书记录信息页面
    {
        path: '/borrow',
        name: 'uiBorrow',
        component: UiBorrowView
    }

]

const router = new VueRouter({
    //mode: 'hash',
    routes
})

export default router

